﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Cryptography;
using System.Text;
using System.Web;

namespace SinsenWeb.Helpers
{
    public static class CryptoHelper
    {
        public static string GetHash(string input)
        {
            var uniEncode = new UnicodeEncoding();
            var rawBytes = uniEncode.GetBytes(input); 
            var hasher = new SHA1CryptoServiceProvider();
            var hash = hasher.ComputeHash(rawBytes);
            var result = Convert.ToBase64String(hash);
            return result;
        }
    }
}
